package com.liu.dw.service.word;

import com.liu.dw.mapper.word.FileResourcesMapper;
import com.liu.dw.vo.word.Wdoument;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @version 1.0
 * @author： LiuWeiGang
 * @date： 2021-12-02 12:19
 */

@Service
public class FileResourcesServiceImpl implements FileResourcesService {

    @Autowired
    private FileResourcesMapper fileResourcesMapper;

    @Override
    public Wdoument getFile(Integer id,String wname) {
        return fileResourcesMapper.getFile(id,wname);
    }

    /**
     * 文档删除
     * @param id
     * @return
     */
    @Override
    public int deleteFile(Integer id) {
        int i = fileResourcesMapper.deleteFile(id);
        return i;
    }

    @Override
    public int deletetable(Integer wdocumentid) {
        return fileResourcesMapper.deletetable(wdocumentid);
    }

    @Override
    public int deleteimage(Integer wdoumentId) {
        return fileResourcesMapper.deleteimage(wdoumentId);
    }

    @Override
    public int deleteword(Integer wdoumentId) {
        return fileResourcesMapper.deleteword(wdoumentId);
    }
}
